// Copyright 2016 Rick Waldron.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-applying-the-exp-operator
description: If base is −∞ and exponent < 0 and exponent is an odd integer, the result is −0.
---*/


function Test() {
    var base = -Infinity;
    var exponents = [];
    exponents[2] = -1;
    exponents[1] = -111;
    exponents[0] = -111111;

    for (var i = 0; i < exponents.length; i++) {
      assert.sameValue(base ** exponents[i], -0, base + " ** " + exponents[i]);
    }
}

// preheat
const NUMBER_OF_PREHEAT = 1;
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}

ArkTools.jitCompileAsync(Test);
assert.sameValue(ArkTools.waitJitCompileFinish(Test), true, '[JIT] JIT disabled.');

// test
const NUMBER_OF_TEST = 1; // or 2
for (let i = 0; i < NUMBER_OF_TEST; i++) {
    Test();
}
